#ifndef WIDGET_H
#define WIDGET_H

#include <QWidget>
#include <QDebug>
#include <QString>
#include <QFileDialog>
#include <QKeyEvent>
#include <QTimerEvent>
namespace Ui {
class Widget;
}

class Widget : public QWidget
{
    Q_OBJECT

public:
    explicit Widget(QWidget *parent = 0);
    ~Widget();
protected:
    void keyPressEvent(QKeyEvent *event);
    void mousePressEvent(QMouseEvent *event);
    void timerEvent(QTimerEvent *event);
   //bool event(QEvent *event);
   bool eventFilter(QObject *watched, QEvent *event);//事件过滤器
private:
    Ui::Widget *ui;
    int timeId;
};

#endif // WIDGET_H
